#ifndef EDITSTUDENT_H
#define EDITSTUDENT_H
#include <QSqlQueryModel>
#include <QSqlTableModel>
#include <QDialog>

namespace Ui {
class editStudent;
}

class editStudent : public QDialog
{
    Q_OBJECT
    
public:
    explicit editStudent(QWidget *parent = 0);
    ~editStudent();
    void getFaculty();
    void addPage(QDialog *page);
    
private:
    Ui::editStudent *ui;
    QSqlQueryModel *groupModel;
    QSqlQueryModel *facultyModel;
    QSqlQueryModel *usersModel;

protected:
    int getIdFaculty(const QString &facName);
    int getIdGroup(const QString &groupName);
    int getIdStudent();

public slots:
    void getGroup(QString facName);
    void getUsers(QString groupName);
    void deleteUser();
    void addBtnClick();
};

#endif // EDITSTUDENT_H
